package com.company;

import java.util.*;

public class MapClass {
    public MapClass() {
        List<Person> list = Arrays.asList(
                new Person("ldq", 18),
                new Person("link", 19),
                new Person("ltx", 20)
        );
        Map<String, Person> map = new HashMap<>();
        for (Person p : list){
            map.put(p.getName(),p);
        }
        System.out.println(map.get("ltx"));
        System.out.println(map.get("link"));
        System.out.println(map.get("ldq"));
    }
    class HashMAP {
        Map<String, Integer> map = new HashMap<>();
    }

    class TreeMAP {
        public TreeMAP() {
            Map<String, Integer> map = new HashMap<>();
            map.put("ldq", 1);
            map.put("link", 2);
            map.put("ltx", 3);
        }
    }

    class SortedMAP {

    }

}
